<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回所有编译并加载模块名的 array</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.get-included-files.html">get_included_files</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.get-magic-quotes-gpc.html">get_magic_quotes_gpc</a></div>
 <div class="up"><a href="ref.info.html">PHP 选项/信息 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.get-loaded-extensions" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">get_loaded_extensions</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">get_loaded_extensions</span> &mdash; <span class="dc-title">返回所有编译并加载模块名的 array</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.get-loaded-extensions-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>get_loaded_extensions</strong></span>
    ([ <span class="methodparam"><span class="type">bool</span> <code class="parameter">$zend_extensions</code><span class="initializer"> = false</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   该函数返回了 PHP 解析器里所有编译并加载的模块名。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.get-loaded-extensions-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">zend_extensions</code></em></dt>

     <dd>

      <p class="para">
       只返回 Zend 扩展，并非类似 mysqli 的普通扩展。默认是 <strong><code>FALSE</code></strong> (返回普通扩展)。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.get-loaded-extensions-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回所有模块名的一个索引数组(array)。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.get-loaded-extensions-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.2.4</td>
       <td>
        添加了可选的 <em><code class="parameter">zend_extensions</code></em> 参数。
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>



 <div class="refsect1 examples" id="refsect1-function.get-loaded-extensions-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-464">
    <p><strong>Example #1 <span class="function"><strong>get_loaded_extensions()</strong></span> 范例</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">get_loaded_extensions</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
   [0] =&gt; xml
   [1] =&gt; wddx
   [2] =&gt; standard
   [3] =&gt; session
   [4] =&gt; posix
   [5] =&gt; pgsql
   [6] =&gt; pcre
   [7] =&gt; gd
   [8] =&gt; ftp
   [9] =&gt; db
   [10] =&gt; calendar
   [11] =&gt; bcmath
)
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.get-loaded-extensions-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.get-extension-funcs.html" class="function" rel="rdfs-seeAlso">get_extension_funcs()</a> - 返回模块函数名称的数组</span></li>
    <li class="member"><span class="function"><a href="function.extension-loaded.html" class="function" rel="rdfs-seeAlso">extension_loaded()</a> - 检查一个扩展是否已经加载</span></li>
    <li class="member"><span class="function"><a href="function.dl.html" class="function" rel="rdfs-seeAlso">dl()</a> - 运行时载入一个 PHP 扩展</span></li>
    <li class="member"><span class="function"><a href="function.phpinfo.html" class="function" rel="rdfs-seeAlso">phpinfo()</a> - 输出关于 PHP 配置的信息</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.get-included-files.html">get_included_files</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.get-magic-quotes-gpc.html">get_magic_quotes_gpc</a></div>
 <div class="up"><a href="ref.info.html">PHP 选项/信息 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
